from django.conf.urls import url

from . import views

urlpatterns = [

    url(r'^channels/$', views.ChannelAPIView.as_view()),  # 频道列表

    url(r'^article/(?P<id>\d+|-1)/channel/$', views.ArticleChannelView.as_view()),   # 文章列表

    url(r'^article/(?P<id>\d+)/collect/$', views.CollectArticleView.as_view()),   # 收藏或取消收藏文章

    url(r'^articles/search/$', views.SearchArticleView.as_view()),   # 根据关键字搜索文章

    url(r'^article/(?P<pk>\d+)/$', views.ArticleDetailView.as_view()),   # 文章详情

    url(r'^article/$', views.PublishArticleView.as_view()),  # 发布文章

    url(r'^article/(?P<id>\d+)/publish_comment/$', views.CommentArticleView.as_view()),  # 评论文章

]
